export default {
  height:'auto',
  calcHeight: 140,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  dialogFullscreen: true,
  column: [
    {
      label: "商品id",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "商品名称",
      width: '90px',
      prop: "name",
      type: "input",
      search: true,
      rules: [{
        required: true,
        message: "请输入商品名称",
        trigger: "blur"
      }],
    },
    {
      label: "商品分类",
      width: '90px',
      prop: "categoryId",
      type: "tree",
      dicData: [],
      addDisabled: false,
      props: {
        label: 'title',
      },
      hide: true,
      rules: [{
        required: true,
        message: "请输入商品分类",
        trigger: "blur"
      }],
    },
    {
      label: "成本价格",
      width: '90px',
      prop: "cost",
      type: "number",
      value: 0,
      precision:2,
      min:0,
      rules: [{
        required: true,
        message: "请输入成本价格",
        trigger: "blur"
      }],
    },
    {
      label: "商品价格",
      width: '90px',
      prop: "price",
      type: "number",
      value: 0,
      precision:2,
      min:0,
      rules: [{
        required: true,
        message: "请输入商品价格",
        trigger: "blur"
      }],
    },
    {
      label: "商品类型",
      width: '90px',
      prop: "goodsType",
      type: "select",
      dicData: [
        {
          value: '0',
          title: '实体商品'
        },
        {
          value: '1',
          title: '虚拟商品'
        }
      ],
      props: {
        value: 'value',
        label: 'title',
      },
      rules: [{
        required: true,
        message: "请输入商品类型",
        trigger: "blur"
      }],
    },
    {
      label: "商品卖点",
      width: '90px',
      prop: "sellingPoint",
      type: "input",
      rules: [{
        required: true,
        message: "请输入商品卖点",
        trigger: "blur"
      }],
    },
    {
      label: "商品编号",
      width: '90px',
      prop: "sn",
      type: "input",
      rules: [{
        required: true,
        message: "请输入商品编号",
        trigger: "blur"
      }],
    },
    {
      label: "上架状态",
      width: '90px',
      prop: "marketEnbale",
      type: "select",
      dicData: [
        {
          value: '0',
          title: '上架'
        },
        {
          value: '1',
          title: '下架'
        }
      ],
      props: {
        value: 'value',
        label: 'title',
      },
      rules: [{
        required: true,
        message: "请选择上架状态",
        trigger: "blur"
      }],
    },
    {
      label: "计量单位",
      width: '90px',
      prop: "goodsUnitId",
      type: "select",
      dicUrl: "/shop-goodsUnit/goodsUnit/list?current=1&size=9999&status=1",
      props: {
        res: "data.records",
        label: "name",
        value: "id"
      },
      rules: [{
        required: true,
        message: "请选择计量单位",
        trigger: "blur"
      }],
    },
    {
      label: "是否推荐",
      width: '90px',
      prop: "recommend",
      type: "select",
      dicData: [
        {
          value: '0',
          title: '推荐'
        },
        {
          value: '1',
          title: '不推荐'
        }
      ],
      props: {
        value: 'value',
        label: 'title',
      },
      rules: [{
        required: true,
        message: "请选择是否推荐",
        trigger: "blur"
      }],
    },
    {
      label: "好评率",
      width: '90px',
      prop: "grade",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "评论数量",
      width: '90px',
      prop: "commentNum",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "规格",
      prop: "spec",
      formsolt: true,
      span: 24,
      hide: true,
    },
    {
      label: "规格详细",
      prop: "specDetail",
      formsolt: true,
      span: 24,
      hide: true,
    },
    {
      label: "商品图片",
      prop: "image",
      type: "upload",
      limit:5,
      listType: 'picture-card',
      propsHttp: {
        res: 'data',
        name:'name',
        url:'link',
      },
      action: 'blade-resource/oss/endpoint/put-file',
      span: 24,
      rules: [{
        required: true,
        message: "请上传图片",
        trigger: "blur"
      }],
      hide: true,
      viewDisabled: true
    },
    {
      label: "商品视频",
      prop: "video",
      type: "upload",
      limit:2,
      listType: 'picture-card',
      propsHttp: {
        res: 'data',
        name:'name',
        url:'link',
      },
      action: 'blade-resource/oss/endpoint/put-file',
      span: 24,
      rules: [{
        required: true,
        message: "请上传视频",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "商品详情",
      prop: "intro",
      component: 'avue-ueditor',
      action: '/blade-resource/oss/endpoint/put-file',
      propsHttp: {
        res: 'data',
        url: 'link',
      },
      rules: [{
        required: true,
        message: "请输入商品详情",
        trigger: "blur"
      }],
      minRows: 4,
      hide: true,
      span: 24,
    },
  ]
}
